package com.itcast.netty;

import com.itcast.netty.handler.listener.NettyServerListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 服务端启动器
 *
 * @author zheng.zhang
 */
@SpringBootApplication
public class NettyApplication implements CommandLineRunner {
	@Autowired
	private NettyServerListener serverListener;

	public static void main(String[] args) {
		SpringApplication.run(NettyApplication.class, args);
	}

	@Override
	public void run(String... args) {
		serverListener.start();
	}
}
